import { Col, Row } from 'antd';
import React from 'react'
import RatioItemEchart from 'components/ratio-item-echart';
/**
 * 名称：占比饼图
 * 描述：占比饼图 包含六个标签的衍生标签占比情况
 * 调用：营销效果中心
 * 输入：store 营销数据
 * 时间：20220404
 */
class RatioDisplayEchart extends React.Component {
 
render() {
    const {store} = this.props
    const {tagRatioData} = store
    
    var ids = ['radio1','radio2','radio3','radio4','radio5','radio6']  
    return (
        
        <Row gutter={16} >
            {ids.map((item,index)=>{
                var ratioData = tagRatioData[index] && tagRatioData[index].ratio
                var ratioTitle = tagRatioData[index]&& tagRatioData[index].name
                var ratioSum = tagRatioData[index]&& tagRatioData[index].num
                var ratioStore = {
                    id:item,
                    ratioTitle: ratioTitle,
                    ratioData: ratioData,
                    ratioSum: ratioSum}
                return  (
                <Col span={12} key={item}>
                    <RatioItemEchart store={ratioStore}/>
                </Col>
                )
           
            })}
            
            
        </Row>
    );
}
}

export default RatioDisplayEchart